<?php
namespace app\common\tool;

class Tool {

    public static function changeArrayKey(&$arr,$key='id'){
        $newArray = [];
        foreach($arr as $k => $v){
            $newArray[$v[$key]] = $v;
        }
        return $newArray;
    }
}